<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>CSS3新增伪元素选择器</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: pink;
        }

        div::before {
            /* 这个content属性是必须要写的！ */
            display: inline-block;
            content: "小";
            width: 30px;
            height: 40px;
            background-color: purple;
        }

        div::after {
            content: "中";
        }
    </style>
</head>

<body>
    <div>
        大
    </div>
</body>

</html>